package com.xq.mapper.impl;

import com.xq.mapper.EmployeeMapper;
import com.xq.pojo.Employee;
import com.xq.utils.MyBatisUtils;
import com.xq.vo.EmployeeVo;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/3 17:52
 * @description 员工数据接口实现层
 */
public class EmployeeMapperImpl implements EmployeeMapper {

    @Override
    public List<EmployeeVo> getAllInJoinDeptIdVo() {
        SqlSession session = MyBatisUtils.openSession();
        List<EmployeeVo> list = session.selectList("com.xq.mapper.EmployeeMapper.getAllInJoinDeptId");
        session.close();
        return list;
    }

    @Override
    public List<Employee> getAllInJoinDeptIdObject() {
        SqlSession session = MyBatisUtils.openSession();
        List<Employee> list = session.selectList("com.xq.mapper.EmployeeMapper.getAllInJoinDeptIdObject");
        session.close();
        return list;
    }

}
